/**
 * Created by d on 2015/12/28.
 */
define(function (require, exports, module) {
    'use strict'
    
    var rk = require('rk');

    require('crm/js/apps/crm/crm');
    var constant = require('crm/js/apps/common/constant')
    require('platform/core/css/all-xsy-widgets.css')
    require('oa/js/su/oa_list')

    $.widget('rk.approval_list', $.rk.oa_list, {
        _create : function(){
            var me = this,
                elem = me.element,
                opt = me.options;
        },

        _init : function(){
            var me = this,
                elem = me.element,
                opt = me.options;

            var layoutHtml = rk.templateText(require('page/tmpl/approval/list_layout.tpl'), {});
            elem.html(layoutHtml);
            var $contentEle = elem.find('div.xsy_oa_detail_body');
            $contentEle.newApprovalList({
                //account 229909
                business: constant.belongIdToBusinessName[rk.getUrlParam('fromBelongId')],
                businessId: rk.getUrlParam('fromDataId')
            });

            me.setTitle();
        }
    });

    module.exports = {
        init : rk.crm.initPanel
    }
});